class User:
    '''用户基本信息类'''
    def __init__(self, first_name, last_name, age, gender):
        self.first_name = first_name
        self.last_name = last_name
        self.age = age
        self.gender = gender
        self.login_attempts = 0

    def describe_user(self):
        print(f"用户全名为：{self.first_name} {self.last_name}")
        print(f"登录次数：{self.login_attempts}")

    def greet_user(self, weekend):
        print(f"今天是{weekend}，祝您心情愉快")

    def increment_login_attempts(self):
        self.login_attempts += 1

    def reset_login_attempts(self):
        self.login_attempts = 0


class Admin(User):
    '''管理员类，继承用户类'''
    def __init__(self, first_name, last_name, age, gender, privileges):
        super().__init__(first_name, last_name, age, gender)
        self.privileges = Privileges(privileges)


class Privileges:
    '''权限类'''
    def __init__(self, privileges):
        self.privileges = privileges

    def show_privileges(self):
        for privilege in self.privileges:
            print(privilege)


admin = Admin("Alan", "Shelby", 26, "male",
              ['can add post', 'can delete post', 'can ban user'])
admin.privileges.show_privileges()
